package com.da.boot.bean;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author JokerDa.
 * @date 2021/1/22 15:53
 * Description:
 */
@AllArgsConstructor
@NoArgsConstructor
@Data
@TableName("user")
public class User {
    /**
     * 所有属性都应该在数据库中
     */
    @TableField(exist = false) //当前属性表中不存在
    private String userName;
    @TableField(exist = false)
    private String password;

    //以下是数据库字段
    private Integer id;
    private String name;
    private Integer age;
    private String email;

    public User(String userName, String password) {
        this.userName = userName;
        this.password = password;
    }
}
